package TCPFile;

import java.io.*;
import java.net.*;

/**
 *
 * @author Rémi Saurel
 */
public class TCPServer {
    public TCPServer(int port) throws IOException {
		_socket = new ServerSocket(port, 0, InetAddress.getByName("127.0.0.1"));
	}
	
	public Socket accept() throws IOException {
            System.out.println(this.toString());
		return _socket.accept();
	}
	
	private ServerSocket _socket;
	InputStream _i;
	OutputStream _o;
}